<template>
	<view>
		<img class="img" :src="msg.image" mode="widthFix" alt="" />
		<view class="newmsg">
			<view>{{ msg.title }}</view>
			<view>{{ msg.date }}</view>
		</view>
		<view class="boxes" v-if="msg.content">
			<rich-text :nodes="msg.content"></rich-text>
		</view>
	</view>
</template>

<script>
import commonUtil from "@/utils/format.js"
export default {
	data() {
		return {
			msg: {}
		};
	},
	async onLoad(options) {
		let res = await this.$api.rongyudetail({ id: options.id });
		if (res.code == 1) {
			res.data.content = commonUtil.text(res.data.content)
			this.msg = res.data;
		}
	},
	methods: {}
};
</script>

<style scoped lang="scss">
.img {
	width: 100%;
}
.newmsg {
	background: #fff;
	margin: 20rpx;
	padding: 20rpx;
	border-radius: 10rpx;
	font-size: 28rpx;
	font-family: PingFang SC;
	font-weight: bold;
	color: #000000;

	view:nth-child(1) {
		font-size: 30rpx;
		font-family: PingFang SC;
		font-weight: 800;
		color: #000000;
		line-height: 36rpx;
	}
	view:nth-child(2) {
		font-size: 28rpx;
		font-family: PingFang SC;
		font-weight: bold;
		color: #000000;
		line-height: 36rpx;
		
		margin: 10rpx 0;
	}
	view:nth-child(3) {
		font-size: 28rpx;
		font-family: PingFang SC;
		font-weight: bold;
		color: #000000;
		line-height: 36rpx;
		margin-bottom: 10rpx;
	}
	view:nth-child(4) {
		font-size: 28rpx;
		font-family: PingFang SC;
		font-weight: bold;
		color: #878787;
	}
}
.boxes {
	background: #fff;
	margin: 20rpx;
	padding: 20rpx;
	border-radius: 10rpx;
	font-size: 28rpx;
	font-family: PingFang SC;
	font-weight: bold;
	color: #000000;
	line-height: 36rpx;
}
</style>
